

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class IsSelectedGetTextIsDisplayed {

	public static void main(String[] args) {
		WebDriver driver = new FirefoxDriver();
		driver.get("http:www.goindigo.in");
		//driver.findElement(By.xpath(".//*[@id='onewayradio']")).click();
		//isSelected = something is selected or not
		System.out.println(driver.findElement(By.xpath(".//*[@id='onewayradio']")).isSelected());
		//getText = will pull out the Text on present xpath
		System.out.println(driver.findElement(By.xpath(".//*[@id='oneWaySearchModal']/div[2]")).getText());
		
		driver.findElement(By.xpath(".//*[@id='indiGoRoundTripSearch_IsArmedForces']")).click();
		//Thread.sleep(5000L);
		
		
		
		
		
	}
	}
